<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>红绿灯</title>
</head>
<body>
    <div class="parent">
        <div class="red">
        </div>
        <div class="green">
        </div>
        <div class="yellow">
        </div>
    </div>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }


        .parent {
            width: 200px;
            height: 600px;
            margin: 0 auto;
            background-color: gray;
            padding: 25px;
        }


        .red, .green, .yellow {
            width: 150px;
            height: 150px;
            border-radius: 50%;
        }


        .red {
            background-color: red;
        }


        .green {
            background-color: green;
            margin-top: 50px;
        }


        .yellow {
            background-color: orange;
            margin-top: 50px;
        }


    </style>
</body>
</html>